diff options
author | Zack Rusin <[email protected]> | 2013-07-11 12:16:06 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2013-07-11 20:19:04 -0400 |
commit | 00cd455bd50c6b16b2f72a6d2726de3d3818c7f5 (patch) | |
tree | 2b13c67bd84020a1bad285c3678b497a571ae1a4 /src/gallium/auxiliary/gallivm | |
parent | a171812d27afb1a52c5d81deaa6027f30bc102e8 (diff) |
gallium: fixup definitions of the rsq and sqrt
GLSL spec says that rsq is undefined for src<=0, but the D3D10
spec says it needs to be a NaN, so lets stop taking an absolute
value of the source which completely breaks that behavior. For
the gl program we can simply insert an extra abs instrunction
which produces the desired behavior there.
Signed-off-by: Zack Rusin <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c index 68bd1243ece..e99c8ef134e 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c @@ -633,8 +633,6 @@ rsq_emit( struct lp_build_tgsi_context * bld_base, struct lp_build_emit_data * emit_data) { - emit_data->args[0] = lp_build_emit_llvm_unary(bld_base, TGSI_OPCODE_ABS, - emit_data->args[0]); if (bld_base->rsq_action.emit) { bld_base->rsq_action.emit(&bld_base->rsq_action, bld_base, emit_data); } else { @@ -1349,9 +1347,6 @@ rcp_emit_cpu( } /* Reciprical squareroot (CPU Only) */ - -/* This is not the same as TGSI_OPCODE_RSQ, which requres the argument to be - * greater than or equal to 0 */ static void recip_sqrt_emit_cpu( const struct lp_build_tgsi_action * action, |