History log of /external/mesa3d/src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e4793701647c9b4112c7789926a564f796d4faeb 16-Jan-2013 Kenneth Graunke <kenneth@whitecape.org> i965: Lower textureGrad() with samplerCubeShadow.

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.

(cherry picked from commit 613e64060c2bc58c3920c3c6ff77291642ba0e23)

When cherry-picking this to stable, I've reordered this before the
Haswell commit that would have introduced a regression.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Anuj Phogat <anuj.phogat@gmail.com> (original)
Tested-by: Ian Romanick <idr@freedesktop.org> (original)
/external/mesa3d/src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp
b0c8d3be73ea777e1fd5870c344afb1d31921411 09-Jul-2012 Kenneth Graunke <kenneth@whitecape.org> i965: Add a lowering pass to convert TXD to TXL by computing the LOD.

Intel hardware doesn't natively support textureGrad with shadow
comparisons. So we need to generate code to handle it somehow.

Based on the equations of page 205 of the OpenGL 3.0 specification,
it's possible to compute the LOD value that would be selected given the
gradient values. Then, we can simply convert the TXD to a TXL.

Currently, this passes 34/46 of oglconform's shadow-grad subtests;
four cubemap tests are regressed. We should investigate this in the
future.

v2: Apply abs() to the scalar case (thanks to Eric).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp