diff options
author | Brian Paul <brianp@vmware.com> | 2010-02-13 17:47:23 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-02-13 17:47:23 -0700 |
commit | 85425b3b609c480cd024b217b1efd0b9153bed58 (patch) | |
tree | bebde60f7f56fc494ca48cf1283bea83178776a9 /src/gallium/drivers/r300/r300_fs.h | |
parent | b30898f4ab533085d97a33638ad0a1cf9ddb1d67 (diff) |
softpipe: fix broken cubemap / mipmap selection code
This is a quick-fix for the time being...
The per-face mipmap LOD computation was invalid at cube edges. In
mip_filter_nearest/linear() we were trying to compute LOD using
texcoords that were sometimes indexes into different cube faces.
The subtraction used to compute the partial derivatives basically
gave random values, so the LOD was unpredictable. This fix simply
uses the same cube face for all four pixels in the quad. The per-
face texcoords all reference the same cube face so the partial
deriviates are computed properly.
A more elaborate fix would involve computing the LOD at the same
time as we choose the cube faces. But for now, this solution works
well and allows the piglit/cubemap test to pass.
(cherry picked from commit 1ff9cd5079b095d7050edb8dc6a7e5b8cad36e1e)
Diffstat (limited to 'src/gallium/drivers/r300/r300_fs.h')
0 files changed, 0 insertions, 0 deletions