OSDN Git Service

meta: Convert Z value from normalized to object-space in meta code
authorBrian Paul <brianp@vmware.com>
Mon, 24 May 2010 21:21:30 +0000 (17:21 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 24 May 2010 21:22:35 +0000 (17:22 -0400)
commita94955843059af787ca5d289a87e2f35a869437a
treee7ee280d9ac3dbdc8d95e90c65c911c2c49a9bc9
parente88cef3c9d5de2a5dccd9ad770952a9d2347ba0d
meta: Convert Z value from normalized to object-space in meta code

Convert Z from a normalized value in the range [0, 1] to an
object-space Z coordinate in [-1, +1] so that drawing at the new Z
position with the default/identity ortho projection results in the
original Z value.  Used by the meta-Clear, Draw/CopyPixels and Bitmap
functions where the Z value comes from the clear value or raster
position.

Fixes piglit tests fdo23670-depth_test, quad-invariance and
glsl-orangebook-ch06-bump as well as oglc zbfunc.c.

https://bugs.freedesktop.org/show_bug.cgi?id=23670
src/mesa/drivers/common/meta.c