r600: fix texture gradients instruction emission (v2)
authorDave Airlie <airlied@redhat.com>
Tue, 18 Nov 2014 22:46:03 +0000 (08:46 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 24 Nov 2014 00:41:30 +0000 (10:41 +1000)
commit38ec1844193570486bf35e25a7a4339a00da127e
treef6f14da8195e2de509c1c61cf1f45dd019ad7be5
parentfecae4625cf9a132bb3fbfeaadbbf3db68be6024
r600: fix texture gradients instruction emission (v2)

The piglit tests were failing, and it appeared to be SB
optimising out things, but Glenn pointed out the gradients
are meant to be clause local, so we should emit the texture
instructions in the same clause. This moves things around
to always copy to a temp and then emit the texture clauses
for H/V.

v2: Glenn pointed out we could get another ALU fetch in
the wrong place, so load the src gpr earlier as well.

Fixes at least:
./bin/tex-miplevel-selection textureGrad 2D

Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Cc: "10.4 10.3" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_shader.c