nv50/ir: saturate depth writes
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 20 Mar 2016 17:11:01 +0000 (13:11 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 28 Mar 2016 12:35:38 +0000 (08:35 -0400)
commit6711f159d94f37f3f45d36a8cb172cfc00692875
tree74e8032bfe99ca8e641afd2545beef87a1871254
parent6262d6125a175d64045083341e74985652f44f17
nv50/ir: saturate depth writes

Apparently there's no post-FS clamping logic, so we have to do this by
hand. The depth will never be outside of the 0..1 range, even on
floating point zeta buffers, so this should be safe.

Fixes dEQP-GLES3.functional.fbo.depth.*clamp.* which tests writing
invalid values on various zeta buffer formats.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp