diff options
author | José Fonseca <jfonseca@vmware.com> | 2009-08-19 09:34:53 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2009-08-19 09:34:53 +0100 |
commit | 6db757e988686903c6d5baad29d367ef071bb95c (patch) | |
tree | e1ada8d8170ab2ad5cc0ce4462da3dedb0328f1f /src/gallium | |
parent | de49c83144c2e42f24925814a208f11ea1024934 (diff) |
llvmpipe: Implement saturation.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c b/src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c index 6561155bfd..805d9fd4b2 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c @@ -199,12 +199,17 @@ emit_store( break; case TGSI_SAT_ZERO_ONE: - /* assert( 0 ); */ + value = lp_build_max(&bld->base, value, bld->base.zero); + value = lp_build_min(&bld->base, value, bld->base.one); break; case TGSI_SAT_MINUS_PLUS_ONE: - assert( 0 ); + value = lp_build_max(&bld->base, value, lp_build_const_uni(bld->base.type, -1.0)); + value = lp_build_min(&bld->base, value, bld->base.one); break; + + default: + assert(0); } switch( reg->DstRegister.File ) { |