diff options
author | José Fonseca <[email protected]> | 2009-08-19 09:34:53 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-08-29 09:21:35 +0100 |
commit | 7926b42d41058e5d2b99ba0e8810f93bc7c12d36 (patch) | |
tree | b9d94708b44d49c885ae3304eb0063b05dbb1254 /src/gallium/drivers | |
parent | 39352b34438affc36ce22852bb55359d304a522c (diff) |
llvmpipe: Implement saturation.
Diffstat (limited to 'src/gallium/drivers')
-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 6561155bfd7..805d9fd4b24 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 ) { |