mesa/src
Kenneth Graunke c0f60106df i965/fs: Don't clobber sampler message MRFs with subexpressions.
Consider a texture call such as:

   textureLod(s, coordinate, log2(...))

First, we begin setting up the sampler message by loading the texture
coordinates into MRFs, starting with m2.  Then, we realize we need the
LOD, and go to compute it with:

   ir->lod_info.lod->accept(this);

On Gen4-5, this will generate a SEND instruction to compute log2(),
loading the operand into m2, and clobbering our texcoord.

Similar issues exist on Gen6+.  For example, nested texture calls:

  textureLod(s1, c1, texture(s2, c2).x)

Any texturing call where evaluating the subexpression trees for LOD or
shadow comparitor would generate SEND instructions could potentially
break.  In some cases (like register spilling), we get lucky and avoid
the issue by using non-overlapping MRF regions.  But we shouldn't count
on that.

Fixes four Piglit test regressions on Gen4-5:
- glsl-fs-shadow2DGradARB-{01,04,07,cumulative}

NOTE: This is a candidate for stable release branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52129
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-08-06 11:16:11 -07:00
..
egl wayland: Support EGL_WIDTH and EGL_HEIGHT queries for wl_buffer 2012-07-19 14:03:17 -04:00
gallium r600g: atomize sampler state v2 2012-08-06 12:04:55 -04:00
gbm gbm: Fix build for wayland include 2012-07-30 11:58:02 -04:00
getopt
glsl scons: set YACCHXXFILESUFFIX to stop needless rebuilding of the parser 2012-08-02 09:40:40 -06:00
glu glu: fix two Clang warnings 2012-05-21 08:29:23 -06:00
glx automake: Honor GL_LIB for mangled/custom lib names 2012-07-23 22:34:13 -07:00
gtest gtest: Don't actually install a library. 2012-04-16 11:25:39 -07:00
mapi shared-glapi: Install libglapi.so.0.0.0 and .0 links in lib/. 2012-07-25 22:37:24 -07:00
mesa i965/fs: Don't clobber sampler message MRFs with subexpressions. 2012-08-06 11:16:11 -07:00
.gitignore automake: Convert src/Makefile to automake. 2012-06-11 09:28:00 -07:00
Makefile.am automake: Convert src/Makefile to automake. 2012-06-11 09:28:00 -07:00
SConscript scons: add code to generate the various GL API files 2012-05-31 09:40:35 -06:00