i965: fix textureGrad for cubemaps
authorTapani Pälli <tapani.palli@intel.com>
Mon, 7 Sep 2015 12:08:13 +0000 (15:08 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Tue, 22 Sep 2015 05:14:20 +0000 (08:14 +0300)
commit7f8815bcb9af9b4b374ad7bd6e7cfa7529a6c980
treefff7008de0f68f5ccac22979c64d18433fc00af3
parent5cede90f6269d517a420856cced705c2d2cc7ef6
i965: fix textureGrad for cubemaps

Fixes bugs exposed by commit
2b1cdb0eddb73f62e4848d4b64840067f1f70865 in:
   ES3-CTS.gtf.GL3Tests.shadow.shadow_execution_frag

No regressions observed in deqp, CTS or Piglit.

v2: address review feedback from Iago Toral:
   - move rho calculation to else branch
   - optimize dx and dy calculation
   - fix documentation inconsistensies

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Kevin Rogovin <kevin.rogovin@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91114
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp