gallium: add some more double opcodes to avoid unnecessary lowering

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Ilia Mirkin
2014-07-25 16:46:42 -04:00
parent 1759689d18
commit 12dedca523
3 changed files with 50 additions and 1 deletions

View File

@@ -1861,6 +1861,45 @@ two-component vectors with doubled precision in each component.
dst.zw = src.zw - \lfloor src.zw\rfloor
.. opcode:: DTRUNC - Truncate
.. math::
dst.xy = trunc(src.xy)
dst.zw = trunc(src.zw)
.. opcode:: DCEIL - Ceiling
.. math::
dst.xy = \lceil src.xy\rceil
dst.zw = \lceil src.zw\rceil
.. opcode:: DFLR - Floor
.. math::
dst.xy = \lfloor src.xy\rfloor
dst.zw = \lfloor src.zw\rfloor
.. opcode:: DROUND - Fraction
.. math::
dst.xy = round(src.xy)
dst.zw = round(src.zw)
.. opcode:: DSSG - Set Sign
.. math::
dst.xy = (src.xy > 0) ? 1.0 : (src.xy < 0) ? -1.0 : 0.0
dst.zw = (src.zw > 0) ? 1.0 : (src.zw < 0) ? -1.0 : 0.0
.. opcode:: DFRACEXP - Convert Number to Fractional and Integral Components