i965: Lower textureGrad() with samplerCubeShadow on pre-Haswell.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 16 Jan 2013 19:14:14 +0000 (11:14 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 18 Jan 2013 18:30:54 +0000 (10:30 -0800)
commit613e64060c2bc58c3920c3c6ff77291642ba0e23
treed1c25c8792b9d70cb6a03616991d69437dd42bc3
parentd03d9b657e73fe026a395c7c7f0e157ad90107c7
i965: Lower textureGrad() with samplerCubeShadow on pre-Haswell.

Fixes regressions since commit 899017fc54c40c969b5239b33f3a17b311878b0d
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Fri Jan 4 07:53:09 2013 -0800

    i965: Use Haswell's sample_d_c for textureGrad with shadow samplers.

That patch assumed that all instances were lowered.  However, we weren't
lowering textureGrad() with samplerCubeShadow because I couldn't figure
out the LOD calculations.  It turns out they're easy: you just have to
use 1 for the depth.  This causes it to pass oglconform's four tests.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Anuj Phogat <anuj.phogat@gmail.com>
Tested-by: Ian Romanick <idr@freedesktop.org>
src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp