mesa/src
Neil Roberts c753866cc4 i965/vec4: Fix the source register for indexed samplers
Previously when setting up the sample instruction for an indirect
sampler the vec4 backend was directly passing the pseudo opcode's
src0. However vec4_visitor::visit(ir_texture *) doesn't set the
texture operation's src0 -- it's left as BAD_FILE, which when
translated into a brw_reg gives the null register. In brw_SAMPLE,
gen6_resolve_implied_move() inserts a MOV from the inst->base_mrf and
sets the src0 appropriately. The indirect sampler case did not have a
call to gen6_resolve_implied_move().

The fs backend avoids this because the platforms that support dynamic
indexing of samplers (IVB+) have been converted to not use the
fake-MRF hack, and instead send from proper GRFs.

This patch makes it call gen6_resolve_implied_move before setting up
the indirect message. This is similar to what is done for constant
sampler numbers in brw_SAMPLE.

The Piglit tests for sampler array indexing didn't pick this up
because they were using a texture with a solid colour so it didn't
matter what texture coordinates were actually used. The tests have now
been changed to be more thorough in this commit:

http://cgit.freedesktop.org/piglit/commit/?id=4f9caf084eda7

With that patch the tests for gs and vs are currently failing on
Ivybridge, but this patch fixes them. There are no other changes to a
Piglit run on Ivybridge.

On Skylake the gs tests were failing even without the Piglit patch
because Skylake needs the source registers to work correctly in order
to send a message header to select SIMD4x2 mode.

(The explanation in the commit message is partially written by Matt
Turner)

Tested-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-06-16 18:44:32 +01:00
..
egl egl: Drop check for driver != NULL. 2015-06-15 10:32:23 -07:00
gallium nv50,nvc0: clamp uniform size to 64k 2015-06-15 15:48:58 -04:00
gbm
getopt
glsl glsl: add ir reader support for ir_barrier 2015-06-16 15:47:02 +02:00
glx glx: fix Scons build 2015-05-22 14:38:33 -06:00
gtest
hgl glapi/hgl: Drop extern "C" as it was added to glapi 2015-05-13 15:26:29 -04:00
loader mesa: build xmlconfig to a separate static library 2015-06-12 15:32:18 +01:00
mapi glapi: Make GL_ARB_direct_state_access functions exclusive to core profile 2015-05-28 16:56:32 -07:00
mesa i965/vec4: Fix the source register for indexed samplers 2015-06-16 18:44:32 +01:00
util util/list: Add a list validation function 2015-05-08 17:16:13 -07:00
Makefile.am mesa; add a dummy _mesa_error_no_memory() symbol to libglsl_util 2015-06-12 15:32:18 +01:00
SConscript