Rusty Lynch [Wed, 13 Jun 2012 04:53:57 +0000 (21:53 -0700)]
Fixing packaging
Rusty Lynch [Wed, 13 Jun 2012 04:50:41 +0000 (21:50 -0700)]
Fixing packaging
Rusty Lynch [Tue, 12 Jun 2012 23:28:46 +0000 (16:28 -0700)]
Add packaging files for Tizen
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>
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)
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)
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)
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)
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>
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)
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)
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>
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>
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)
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)
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)
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)
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)
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)
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)
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)
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.
Kristian Høgsberg [Tue, 16 Oct 2012 18:04:02 +0000 (14:04 -0400)]
wayland: Remove 0.85 compatibility #ifdefs
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.
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.
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>
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>
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)
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)
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)
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)
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)
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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)
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>
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>
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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>
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)
Matt Turner [Thu, 27 Sep 2012 22:35:15 +0000 (15:35 -0700)]
build: Add visibility CFLAGS to OSMesa
(cherry picked from commit
24ded898761757ec68e8f6dbe7de1f18c0be3f63)
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
Matt Turner [Thu, 27 Sep 2012 20:29:08 +0000 (13:29 -0700)]
build: Set visibility CFLAGS in dri/swrast
(cherry picked from commit
4cfff7211c7897353a07c48ad80a681c8e1e8298)
Matt Turner [Thu, 27 Sep 2012 20:29:01 +0000 (13:29 -0700)]
build: Set visibility CFLAGS in dri/r200
(cherry picked from commit
362840270702f32c1b4e5a52e04f4cad3f1de004)
Matt Turner [Thu, 27 Sep 2012 20:28:54 +0000 (13:28 -0700)]
build: Set visibility CFLAGS in dri/radeon
(cherry picked from commit
55d45efdd8276ec4b2795e82e3d9bb57c3b1425d)
Matt Turner [Thu, 27 Sep 2012 20:28:45 +0000 (13:28 -0700)]
build: Set visibility CFLAGS in dri/nouveau
(cherry picked from commit
340637d54db171d9b5ee95ee943b590c416c0b66)
Matt Turner [Thu, 27 Sep 2012 20:28:37 +0000 (13:28 -0700)]
build: Set visibility CFLAGS in dri/i915
(cherry picked from commit
381d120b8af9e25d3bcb829a250e602b61d0971a)
Matt Turner [Thu, 27 Sep 2012 20:28:27 +0000 (13:28 -0700)]
build: Set visibility CFLAGS in dri/common
(cherry picked from commit
d2872b561258d66e1b606310d12398a64002a25d)
Matt Turner [Thu, 27 Sep 2012 20:13:25 +0000 (13:13 -0700)]
build: Build src/glsl with visibility CFLAGS
(cherry picked from commit
8746f641bb47d210fa16bb99aeb8150b06aff674)
Matt Turner [Thu, 20 Sep 2012 22:56:10 +0000 (15:56 -0700)]
build: Turn on visibility CFLAGS for core mesa
(cherry picked from commit
710a90ccaf6ebdaad71b5d1d3fbb3e84773271ce)
Matt Turner [Wed, 19 Sep 2012 05:09:26 +0000 (22:09 -0700)]
build: Use AX_PTHREAD's HAVE_PTHREAD preprocessor definition
(cherry picked from commit
814345f54b74eee2597cf84f3c34817488f07522)
Conflicts:
src/mapi/glapi/gen/gl_x86-64_asm.py
src/mapi/glapi/gen/gl_x86_asm.py
Matt Turner [Wed, 19 Sep 2012 04:51:25 +0000 (21:51 -0700)]
build: Use PTHREAD_LIBS and PTHREAD_CFLAGS
(cherry picked from commit
b6651ae6ad314a93287e431a41f5c7a8f8f6c855)
Conflicts:
src/mesa/main/tests/Makefile.am
Matt Turner [Mon, 1 Oct 2012 20:00:18 +0000 (13:00 -0700)]
dri drivers: Link dricommon before dynamic libraries
I think libtool should be handling this for us, but the build fails for
Jordan because libdricommon (a static library, which uses expat) appears
before -lexpat on the linker command.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Jordan Justen <jordan.l.justen@intel.com>
(cherry picked from commit
31ab61cac10bf75210134b6d8a354ac3cbd3b4da)
Conflicts:
src/mesa/drivers/dri/i965/Makefile.am
Oliver McFadden [Tue, 2 Oct 2012 10:53:34 +0000 (13:53 +0300)]
Revert "i965: Implement guardband clipping on Ivybridge."
This reverts commit
610910a66d1a97ca51ad8a003bdeadfe9563d721.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55523
Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Oliver McFadden [Tue, 2 Oct 2012 10:53:11 +0000 (13:53 +0300)]
Revert "i965: Implement guardband clipping on Sandybridge."
This reverts commit
85cd30406ff8414bc6ac6de1064d059a4c564160.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55523
Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Wed, 3 Oct 2012 05:50:02 +0000 (22:50 -0700)]
build: Remove autoconf check for signbit
rebase failure in
7da12426f7682ffc44ae40e31d1b5712521fbb70.
(cherry picked from commit
159ca32fec6276fa267746c843f23ce0a6732f1d)
Brian Paul [Thu, 27 Sep 2012 12:31:25 +0000 (06:31 -0600)]
mesa: fix glCompressedTexSubImage assertion/segfault
If the destination texture image doesn't exist we'd hit an assertion
(or crash in a release build). The piglit/s3tc-errors test hits this.
This has already been fixed in master by the error checking code
consolidation.
Note: This is a candidate for the 8.0 branch.
Brian Paul [Sat, 15 Sep 2012 15:01:02 +0000 (09:01 -0600)]
scons: add new -p (prefix) options for yacc
These were recently added to the Makefiles.
(cherry picked from commit
e78ebbc5f9448d459b57884d90b0a6496294c1dd)
Marek Olšák [Tue, 25 Sep 2012 15:28:13 +0000 (17:28 +0200)]
r600g: fix EXP on Cayman
NOTE: This is a candidate for the stable branches.
(cherry picked from commit
96f50d0cf7bb13507f272d2f6ef9a6fca24d18e1)
Marek Olšák [Tue, 25 Sep 2012 15:20:38 +0000 (17:20 +0200)]
r600g: fix RSQ of negative value on Cayman
NOTE: This is a candidate for the stable branches.
(cherry picked from commit
fd5c5384648a0d6191c19748a2d1f1148c5ee98f)
Marek Olšák [Tue, 25 Sep 2012 14:09:24 +0000 (16:09 +0200)]
r600g: fix instance divisor on Cayman
Not sure if this is the best way to fix it.
NOTE: This is a candidate for the stable branches.
(cherry picked from commit
836325bf7edd797e02ab0717a05ca5c51aa1ac93)
Kenneth Graunke [Sun, 16 Sep 2012 06:18:36 +0000 (23:18 -0700)]
meta: Use float for temporary images, not (un)signed normalized.
In commit
091eb15b694, Jordan changed get_temp_image_type() to use
_mesa_get_format_datatype() instead of returning GL_FLOAT. That has
several possible return values: GL_FLOAT, GL_INT, GL_UNSIGNED_INT,
GL_SIGNED_NORMALIZED, and GL_UNSIGNED_NORMALIZED.
We do want to use GL_INT/GL_UNSIGNED_INT for integer formats. However,
we want to continue using GL_FLOAT for the normalized fixed-point types.
There isn't any code in pack.c to handle GL_(UN)SIGNED_NORMALIZED.
Fixes oglconform's fboarb advanced.blit.copypix, which was regressed by
commit
091eb15b694a396f8453093575ccec2db7f14eb8.
NOTE: This is a candidate for the 9.0 branch.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53573
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
3767b25bd3f77cede452cfbe9b66a51b352d9036)
Eric Anholt [Fri, 21 Sep 2012 05:50:05 +0000 (07:50 +0200)]
i965: Remove broken non-interleaved-to-interleaved upload code.
This failed when all the uploads to occur were uniform-type vertex data (like
glColor4f being active across a DrawArrays), because it would upload 1 element
instead of 1 element per vertex. There was no citation for how this code
helped any particular application, and it breaks ETQW, so just remove it.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47170
NOTE: This is a candidate for the 9.0 and 8.0 branches.
Reviewed-and-tested-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
0334e8dc25d09e3254e61d5d122b4fd7bfbd627a)
Kenneth Graunke [Fri, 14 Sep 2012 09:39:52 +0000 (02:39 -0700)]
meta: Don't _mesa_set_enable() invalid targets in ES 1.
GL_TEXTURE_1D, GL_TEXTURE_3D, GL_TEXTURE_RECTANGLE, and
GL_TEXTURE_GEN_S/T/R/Q don't exist in ES 1 contexts, so any meta ops
that used _mesa_meta_begin with MESA_META_TEXTURE would trigger GL
errors. One such operation is _mesa_meta_Clear().
On ES 1, we want to disable GL_TEXTURE_GEN_STR_OES instead.
Fixes the ES1 conformance test miplin.c, which was regressed by commit
08be1d288f216232d3974f5997b266a8dd720928.
NOTE: This is a candidate for the 9.0 branch.
v2: Also blacklist GL_TEXTURE_3D, per Brian's comment.
v3: Disable GL_TEXTURE_GEN_STR_OES, per Ian's comment.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54297
Reviewed-by: Brian Paul <brianp@vmware.com> [v1]
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
679c93ff89c71cbd3b1d24e88abd38f00b8c1f02)
Matt Turner [Wed, 19 Sep 2012 03:22:37 +0000 (20:22 -0700)]
build: Link libglapi with pthreads
NOTE: This is a candidate for the 9.0 branch.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=839060
https://bugs.gentoo.org/show_bug.cgi?id=435152
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit
9ed00075d8ea0ffaa675237e32b8611ad3064dbf)
Matt Turner [Wed, 19 Sep 2012 03:21:47 +0000 (20:21 -0700)]
build: Use AX_PTHREAD to detect pthreads
NOTE: This is a candidate for the 9.0 branch.
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit
7da12426f7682ffc44ae40e31d1b5712521fbb70)
Brian Paul [Sat, 22 Sep 2012 15:30:23 +0000 (09:30 -0600)]
mesa: fix incorrect error for glCompressedSubTexImage
If a subtexture region isn't aligned to the compressed block size,
return GL_INVALID_OPERATION, not gl_INVALID_VALUE.
NOTE: This is a candidate for the stable branches.
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
1f586684d62c4f5208d1f3929d067a79ea2140ac)
Ian Romanick [Thu, 27 Sep 2012 00:57:01 +0000 (17:57 -0700)]
i915: Don't free the intel_context structure when intelCreateContext fails.
intelDestroyContext will eventually be called, and it will clean things up.
NOTE: This is a candidate for the 9.0 branch.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53618
(cherry picked from commit
de958de71b1450952e021af4e729c87406353db6)
Ian Romanick [Fri, 31 Aug 2012 21:55:21 +0000 (14:55 -0700)]
i965: Don't free the intel_context structure when intelCreateContext fails.
This squashes two commits from master:
i965: Don't free the intel_context structure when intelCreateContext fails.
intelDestroyContext will eventually be called, and it will clean things
up. The call to brwInitVtbl is moved earlier so that
intelDestroyContext can call the device-specific destructor. This also
makes the code look more like the i915 code.
NOTE: This is a candidate for the 9.0 branch.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54301
(cherry picked from commit
87f26214d6bdeb439b30615ec53c293c5141cf11)
And:
i965: brwInitVtbl needs to know the chipset generation
Fixes major regressions since de958de.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit
e87c63f2889fcbeb5a8bbd91eda1333d7ed44bf2)
The second commit message should have read 'since 87f2621', of course.
Ian Romanick [Fri, 28 Sep 2012 15:29:12 +0000 (08:29 -0700)]
intel: Don't call intelDestroyContext if there is no context to destroy
Some error paths in the device-specific context creation functions can exit
before the deintel_context structure is allocated.
NOTE: This is a candidate for the 9.0 branch.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53618
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54301
(cherry picked from commit
22897c74979aa02facdd5cd729db8dadf86924f5)
Ian Romanick [Wed, 26 Sep 2012 18:08:11 +0000 (11:08 -0700)]
dri_util: Use calloc to allocate __DRIcontext
The __DRIcontext contains some pointers, and some drivers check for them to be
NULL in some failure paths. Instead of sprinkling NULL assignments across the
various drivers, just zero out the whole thing.
NOTE: This is a candidate for the 9.0 branch.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-and-tested-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Lu Hua <huax.lu@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53618
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54301
(cherry picked from commit
f93cb0bebb10e3e3e5df099be51021b211650356)
Kenneth Graunke [Tue, 11 Sep 2012 23:20:43 +0000 (16:20 -0700)]
i965/blorp: Add support for blits between SRGB and linear formats (fixed).
This is a squash of 2 commits from master.
The first commit is:
i965/blorp: Add support for blits between SRGB and linear formats.
Fixes colorspace issues in L4D2 when multisampling is enabled (the
scene was far too dark, but the flashlight area was way too bright).
The nVidia and AMD binary drivers both allow this kind of blit.
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
e2249e8c4d06a85d6389ba1689e15d7e29aa4dff)
The second commit is:
i965/blorp: Fix sRGB MSAA resolves.
Commit
e2249e8c4d06a85d6389ba1689e15d7e29aa4dff (i965/blorp: Add
support for blits between SRGB and linear formats) changed blorp to
always configure surface states for in linear format (even if the
underlying surface is sRGB). This allowed sRGB-to-linear and
linear-to-sRGB blits to occur without causing the image to be
inappropriately brightened or darkened.
However, it broke sRGB MSAA resolves, since they rely on the
destination buffer format being sRGB in order to ensure that samples
are averaged together in sRGB-correct fashion.
This patch fixes the problem by instead configuring the source buffer
to use the *same* format as the destination buffer. This ensures that
the image won't be brightened or darkened, but preserves proper sRGB
averaging.
Fixes piglit tests "EXT_framebuffer_multisample/accuracy srgb".
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55265
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-and-tested-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
124b214f094fa63ff1ddb7e9f0a1c2e0ba8214fb)
Paul Berry [Wed, 19 Sep 2012 20:28:00 +0000 (13:28 -0700)]
i965: Don't spill "smeared" registers.
Fixes an assertion failure when compiling certain shaders that need both
pull constants and register spilling:
brw_eu_emit.c:204: validate_reg: Assertion `execsize >= width' failed.
NOTE: This is a candidate for the 8.0 release branch.
Signed-off-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
ab5ce2789fe9e5f2789ee22fdb02bcfed42a7125)
Paul Berry [Wed, 12 Sep 2012 18:13:49 +0000 (11:13 -0700)]
i965/blorp: Increase Y alignment for multisampled stencil blits.
This patch is a band-aid fix for a bug in commit 5fd67fa (i965/blorp:
Reduce alignment restrictions for stencil blits), which causes
multisampled stencil blits to work incorrectly on Sandy Bridge.
When blitting to or from a normal stencil buffer, we have to use a
coordinate transformation that swizzles coordinates to account for the
fact that stencil buffers use W tiling, but the most similar tiling
format available for textures and render targets is Y tiling. The
differences between W and Y tiling cause pixels to be scrambled within
a block of size 8x4 (width x height) as measured relative to a W tile,
or 16x2 as measured relative to a Y tile. So in order to make sure
that pixels at the edges of the blit aren't lost, we need to align the
rendering rectangle (and the buffer sizes) to multiples of the 8x4
block size. This alignment happens in the brw_blorp_blit_params
constructor, whereas the determination of how to swizzle the
coordinates happens during code generation, in the
brw_blorp_blit_program class.
When blitting to or from a multisampled stencil buffer, the coordinate
swizzling is more complex, because it has to account for the
interleaving pattern of samples, which uses 4x4 blocks for 4x MSAA and
8x4 blocks for 8x MSAA. The end result is that if multisampling is in
use, the 16x2 block size (relative so a Y tile) needs to be expanded
to 16x4, and the corresponding size relative to a W tile expands to
8x8.
The problem doesn't affect Ivy Bridge severely enough to crop up in
Piglit tests because on Ivy Bridge we have to disable multisampling
when blitting *to* a multisampled stencil buffer (the blorp compiler
generates code to compensate for the fact that multisampling is
disabled). However I suspect a bug is still present because we don't
disable multisampling when blitting *from* a multisampled stencil
buffer.
This patch fixes the problem by doubling the vertical alignment
requirement when blitting to or from a multisampled stencil buffer,
and multisampling has not been disabled.
In the long run I would like to rework the brw_blorp_blit_params
constructor--it's difficult to follow and has had several subtle bugs
like this one. However this band-aid fix should be suitable for
cherry-picking to release branches.
Fixes Piglit tests "unaligned-blit {2,4} stencil {msaa,upsample}" on
Sandy Bridge.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
a33ce665a5827c598b85bb04d94b33e6a5e41c28)
Paul Berry [Thu, 30 Aug 2012 15:01:54 +0000 (08:01 -0700)]
i965/blorp: Fix offsets and width/height for stencil blits.
Fixes piglit test "framebuffer-blit-levels draw stencil".
Acked-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
1a5d4f7cb2367c7863b28efbd78e9169114baf42)
Paul Berry [Wed, 29 Aug 2012 21:26:48 +0000 (14:26 -0700)]
i965/blorp: Reduce alignment restrictions for stencil blits.
Previously, we aligned all stencil blit operations to multiples of the
size of a tile, since stencil buffers use W-tiling, and blorp has to
approximate this by configuring the 3D pipeline for Y-tiling and
swizzling coordinates.
However, this was unnecessarily conservative; it turns out that the
differences between W-tiling and Y-tiling are confined to 32-byte
sub-tiles within the 4k tiling pattern; the layout of these 32-byte
sub-tiles within the larger 4k tile is the same (8 sub-tiles across by
16 sub-tiles down, in column-major order). Therefore we only need to
align stencil blit operations to multiples of the sub-tile size.
Note: although the performance improvement of this change is probably
quite small, the fact that W-tiling and Y-tiling formats only differ
within 32-byte sub-tiles will be essential in a future patch to ensure
that stencil blits work correctly between parts of the miptree other
than level/layer 0. Making this change provides handy documentation
(and validation) of this fact.
Acked-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
5fd67fac14d7f35c311eb5c671be8d4ae9b2ea37)
Paul Berry [Wed, 29 Aug 2012 22:11:49 +0000 (15:11 -0700)]
i965/blorp: don't reduce stencil alignment restrictions when multisampling.
When blitting to a stencil buffer, we need to align the rectangle we
send down the rendering pipeline, to account for the fact that the
stencil buffer uses a W-tiled layout, but we are configuring its
surface state as Y-tiled.
Previously, when the stencil buffer was multisampled, we assumed that
we could reduce the amount of alignment that was necessary, since each
pixel occupies a block of 2x2 or 4x2 samples in the stencil buffer.
That would have been correct if the coordinates we were adjusting were
measured in pixels. However, the conversion from pixel coordinates to
coordinates within the interleaved buffer has already been done;
therefore the full alignment restriction applies.
Note: the reason this mistake wasn't previously uncovered by piglit
tests is because it is being masked by another mistake: the blorp
engine is using overly conservative alignment restrictions when doing
stencil blits. The overly conservative alignment restrictions will be
removed in the patch that follows. Doing this fix now will prevent
the subsequent patch from introducing regressions.
Acked-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
1a75063d5f829547b75b60ae64bddf3905b4cb8f)
Paul Berry [Thu, 30 Aug 2012 18:16:44 +0000 (11:16 -0700)]
intel: Add map_stencil_as_y_tiled to intel_region_get_aligned_offset.
This patch modifies intel_region_get_aligned_offset() to make the
appropriate calculation when the blorp engine sets up a W-tiled
stencil buffer using a Y-tiled SURFACE_STATE.
Acked-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
b760c9913dcff848a2aa0e60abeb48e596ae8fee)
Paul Berry [Thu, 30 Aug 2012 17:57:03 +0000 (10:57 -0700)]
intel: Add map_stencil_as_y_tiled to intel_region_get_tile_masks.
When the blorp engine is performing a blit from one stencil buffer to
another, it sets up the surface state for these buffers as Y-tiled, so
it needs to be able to force intel_region_get_tile_masks() to return
the appropriate masks for a Y-tiled region.
Acked-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
50dec7fc2d5ba813aaa822596d124098a22db301)
Paul Berry [Wed, 29 Aug 2012 23:04:15 +0000 (16:04 -0700)]
i965/blorp: Account for offsets when emitting SURFACE_STATE.
Fixes piglit tests "framebuffer-blit-levels {read,draw} depth".
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
f04f219906e40a6647a10fd9c1928509fe25fb84)
Paul Berry [Thu, 16 Aug 2012 17:06:08 +0000 (10:06 -0700)]
i965/blorp: Thread level and layer through brw_blorp_blit_miptrees().
Previously, when performing a blit using the blorp engine, we failed
to account for the level and layer of the source and destination. As
a result, all blits would occur between miplevel 0 and layer 0 of the
corresponding textures, regardless of which level/layer was bound to
the framebuffer.
This patch passes the correct level and layer through
brw_blorp_miptrees() into the brw_blorp_blit_params data structure.
Further patches in the series will adapt
gen{6,7}_blorp_emit_surface_state to make use of these parameters.
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
3123f0621561549c4566248100661ef77cab2834)
Paul Berry [Wed, 29 Aug 2012 19:16:06 +0000 (12:16 -0700)]
i965/blorp: store x and y offsets in brw_blorp_mip_info.
Currently, gen{6,7}_blorp_emit_surface_state assumes that the src and
dst surfaces are mapped to miplevel 0 and layer 0 (thus no surface
offset is required). This is a bug, since the user might try to blit
to and from levels/layers other than 0.
To fix this bug, it will not be sufficient to have
gen6_{6,7}_blorp_emit_surface_state look up the surface offset at the
time they set up the surface state, since these offsets will need to
be tweaked when blitting stencil buffers (due to the fact that stencil
buffer blits have to swizzle between W and Y tiling formats).
So, to pave the way for the bug fix, this patch causes the x and y
offsets to be computed during blit setup and stored in
brw_blorp_mip_info.
As a result of this change, brw_blorp_mip_info doesn't need to store
the level and layer anymore.
For consistency, this patch makes a similar change to the handling of
depth buffers when doing HiZ operations.
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
c130ce7b2b26b4b67d4bf2b6dd1044a200efe25d)